package com.lwq.designpattern.behavioralPatterns.strategyPattern;

/**
 * @ClassName
 * @Description
 * @Author liwq
 * @Date 2021/5/10 9:53
 * @Version 1.0
 */
public class Calculate {
    private Strategy strategy;

    public Calculate(Strategy strategy) {
        this.strategy = strategy;
    }

    public int executeStrategy(int num1, int num2) {
        return strategy.doOperation(num1, num2);
    }
}
